package truef.customer.domain;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.cs.software.base.domain.BaseTreeEntity;

@Table(name="T_CUSTOMER")
@Entity
@NamedQueries({ @NamedQuery(name = "Customer.getRoot", query = "select g from Customer g where g.parent is null") })
public class Customer extends BaseTreeEntity<Customer> {
	
	private static final long serialVersionUID = -9010915145350103613L;

	@Column(name = "Coupon")
	//商品
	@OneToMany(mappedBy = "customer", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	Set<Coupon> Conpons;
	
	String Name;
	
	int PhoneNumber;
	
	String Sex;
	
	int Id;
	
	int PassWord;

	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	public int getPhoneNumber() {
		return PhoneNumber;
	}

	public void setPhoneNumber(int phoneNumber) {
		PhoneNumber = phoneNumber;
	}

	public String getSex() {
		return Sex;
	}

	public void setSex(String sex) {
		Sex = sex;
	}

	public Long getId() {
		return (long) Id;
	}

	public void setId(int id) {
		Id = id;
	}

	public int getPassWord() {
		return PassWord;
	}

	public void setPassWord(int passWord) {
		PassWord = passWord;
	}

	public void setcode(String string) {
		// TODO Auto-generated method stub
		
	}
}
